markdown 节点版本问题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 节点版本问题相关的知识,希望对你有一定的参考价值。

If you are having problems with node versions in a project you can have npm run them in the container, eg by adding this to your Makefile:

```
make ddev-gulp-build:
    # Run gulp build from the folder where your package.json is, within node modules, specifying the path to the gulpfile within the container.
    ddev exec bash -c './themes/THEMENAME/align/assets/src/node_modules/gulp/bin/gulp.js build --gulpfile /var/www/html/web/themes/custom/align/assets/src/gulpfile.js'

make ddev-gulp-watch:
    # Run gulp watch from the folder where your package.json is, within node modules, specifying the path to the gulpfile within the container.
    # Note that you won't see the 'recompile' or errors like this unfortunately. To get those, do `ddev ssh` and run the below command within quotes.
    ddev exec bash -c './themes/THEMENAME/align/assets/src/node_modules/gulp/bin/gulp.js watch --gulpfile /var/www/html/web/themes/custom/align/assets/src/gulpfile.js'
```

Then your npm would be run from within the container to initially install

```
make ddev-npm-install:
    # Remove package lock file and node modules for reinstall.
    ddev exec 'rm ./themes/THEMENAME/align/assets/src/package-lock.json'
    ddev exec 'rm -rf ./themes/THEMENAME/align/assets/src/node_modules'
    # Reinstall using node version within container.
    ddev exec bash -c 'cd ./themes/THEMENAME/align/assets/src/ && npm install'
````

以上是关于markdown 节点版本问题的主要内容,如果未能解决你的问题,请参考以下文章

markdown 节点开发

markdown 节点疑惑

markdown CLI提示。节点工具

markdown 节点Fullstack示例

markdown 【节点】正则表达式

markdown 节点#node