Я пытаюсь переместить мои node_modules в другое место, то, что я сделал, удалил node_modules и переместил package.json в место, где я хотел, чтобы оно было установлено, затем я побежал npm install
который установил node_modules, где я хотел, но теперь, если я бегу npm start
, сервер запускается и я получаю много ошибок:Как правильно перемещать node_modules в другое место
(index):5 GET http://localhost:3000/node_modules/bootstrap/dist/css/bootstrap.min.css
(index):9 GET http://localhost:3000/node_modules/es6-shim/es6-shim.min.js
(index):10 GET http://localhost:3000/node_modules/systemjs/dist/system-polyfills.js
(index):12 GET http://localhost:3000/node_modules/angular2/bundles/angular2-polyfills.js
(index):13 GET http://localhost:3000/node_modules/systemjs/dist/system.src.js
(index):14 GET http://localhost:3000/node_modules/rxjs/bundles/Rx.js
(index):15 GET http://localhost:3000/node_modules/angular2/bundles/angular2.dev.js
(index):16 GET http://localhost:3000/node_modules/angular2/bundles/http.dev.js
(index):21 Uncaught ReferenceError: System is not defined(anonymous function) @ (index):21
Я обновил файл index.html, чтобы использовать файлы из корневой node_modules вместо тока dir's node_modules.
Что еще я должен сделать, чтобы заставить его работать?
Обратите внимание, что index.html находится в директории различно то node_modules
Возможный дубликат [Изменить узел \ _modules location] (http://stackoverflow.com/questions/18974436/change-node-modules-location) –